package com.gsm.utils;

/**
 * 随机数
 */
public class VerifyCodeUtils {

    /**
     * 获得四位数的随机数
     * @return
     */
    public static Integer getRandom4() {
        int max = 9999;
        int min = 1000;
        int i = (int) (Math.random() * (max - min + 1) + min);
        return i;
    }

    /**
     * 获得六位数的随机数
     * @return
     */
    public static Integer getRandom6() {
        int max = 999999;
        int min = 100000;
        int i = (int) (Math.random() * (max - min + 1) + min);
        return i;
    }
}
